//
//  YDAboutUsCell.m
//  PeiZiWangBei
//
//  Created by 巨彦新 on 2018/1/2.
//  Copyright © 2018年 LK-IOS. All rights reserved.
//

#import "YDAboutUsCell.h"

@interface YDAboutUsCell ()


@end

@implementation YDAboutUsCell


+ (instancetype)cellWithTableview:(UITableView *)tableview
{
    static NSString *const PZAboutUsCellId = @"YDAboutUsCell";
    
    YDAboutUsCell *cell = [tableview dequeueReusableCellWithIdentifier:PZAboutUsCellId];
    if (cell == nil) {
        cell = [[YDAboutUsCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:PZAboutUsCellId];
    }
    return cell;

}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.backgroundColor = [UIColor whiteColor];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self title];
        [self detail];
    }
    return self;
}


-(UILabel *)title
{
    if (!_title) {
        _title = [UILabel new];
        [self.contentView addSubview:_title];
        _title.textColor = [UIColor grayColor];
        _title.font = [UIFont systemFontOfSize:font14ScreenWRate *LKScreenW];
        [_title mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(@(rate375(27)));
            make.centerY.equalTo(self.contentView);
        }];
    }
    return _title;
}

-(UILabel *)detail
{
    if (!_detail) {
        _detail = [UILabel new];
        [self.contentView addSubview:_detail];
    
        _detail.font = [UIFont systemFontOfSize:font14ScreenWRate *LKScreenW];
        [_detail mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(_title.mas_right).offset(2);
            make.centerY.equalTo(self.contentView);
        }];
    }
    
    return _detail;
}
@end
